package com.ctshk.rpc.bus.entity.es;

import com.ctshk.common.constant.ElasticSearchConstant;
import com.ctshk.rpc.bus.dto.es.BusProductCacheDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 北落
 * @create 2021-04-28
 */
@Data
@ApiModel(value = "BusLineCache对象", description = "巴士路线缓存实体")
@Document(indexName = ElasticSearchConstant.BUS_INDEX ,createIndex = true)
public class BusLineCache implements Serializable {

    //    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "路线id")
    private Long id;

    //    @Field(type = FieldType.Text,index = false)
    @ApiModelProperty(value = "车辆类型")
    private Integer vehicleType;

    //    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "出发城市id")
    private Long departureCityId;

    //    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "出发城市名称")
    private String departureCityName;

    //    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "到达城市id")
    private Long arriveCityId;

    //    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "到达城市名称")
    private String arriveCityName;

    //    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "关口id")
    private Long gatewayId;

    //    @Field(type = FieldType.Text,index = false)
    @ApiModelProperty(value = "关口名称")
    private String gatewayName;

    //    @Field(type = FieldType.Date,format = DateFormat.date_hour_minute_second)
    @ApiModelProperty(value = "预计耗时")
    private LocalDateTime estimatedTime;

    //    @Field(type = FieldType.Nested)
    @ApiModelProperty(value = "巴士产品列表")
    private List<BusProductCache> busProductList;
}
